<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body id="body">
    
</body>
<script>

    function MyColor(min,max){
        return Math.floor(Math.random() * (max - min + 1)) + min;
    }
    // MyColor(0,255)
    // console.log(MyColor(0,255))
    var body = document.getElementById('body')
    var r = MyColor(0,255);
    var g = MyColor(0,255);
    var b = MyColor(0,255);
    var color = 'rgb('+r+','+g+','+b+')';
    body.style.backgroundColor = color;
    
    var a = 30;
    var b = 40
    var num = Math.floor(Math.random() * (b - a + 1) ) + a;
    // console.log(num)
</script>
</html>